home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation How-To
/
Animation How-to CD.iso
/
PLY
/
CHAPTER2
/
ROCKET
/
ROCKET2.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-01-01
|
1KB
|
63 lines
' ROCKET2.BAS
SCREEN 12
WINDOW (-32, -24)-(32, 24)
' a tunnel conveyor belt
FOR frame = 0 TO 200
nudge = 2 - (frame MOD 20) / 10
LOCATE 10, 38: PRINT USING "### "; frame
' pause code - use as needed
FOR w = 1 TO 1000: NEXT w
'the tunnel
FOR px = -15 TO 16
'undraw
ox = px + nudge + .1
IF px MOD 2 = 0 THEN
LINE (ox - .5, -2)-(ox + .5, 2), 0, B
ELSE
LINE (ox - .5, -.5)-(ox + .5, .5), 0, B
END IF
'draw
x = px + nudge
IF px MOD 2 = 0 THEN
LINE (x - .5, -2)-(x + .5, 2), 15, B
ELSE
LINE (x - .5, -.5)-(x + .5, .5), 15, B
END IF
NEXT px
'the ship
rocketx = -40 + frame / 3
'undraw
FOR section = -4 TO 4
LINE (orx - .4 + section, ory - .05)-(orx + .4 + section, ory + .05), 0, BF
NEXT section
'draw
FOR section = -4 TO 4
LINE (rocketx - .4 + section, rockety - .05)-(rocketx + .4 + section, rockety + .05), 4, BF
NEXT section
'save
orx = rocketx
ory = rockety
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
'traveling "chaser" lights using modulo math again
'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
trl1 = -16 + frame MOD 16
trl2 = 0 + frame MOD 16
LINE (trl1, -5)-(trl1, 5), count
LINE (trl2, -5)-(trl2, 5), count
IF trl2 = 0 THEN count = count + 1
NEXT frame